﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Enyim.Caching;
using SilenthinkContract;
using Web.Manage.Controllers;
using Web.Manage.Areas.Order.Models;

namespace Web.Manage.Areas.Order.Controllers
{
    public class HomeController : BaseController
    {
        public HomeController(ILogService logService, IBaseService baseService, IExtraService extraService, IStoreService storeService, IOrderService orderService, IGameService gameService, IAuctionService auctionService, IPassportService passportService, IPaymentService paymentService, IMemcachedClient memcachedClient) : base(logService, baseService, extraService, storeService, orderService, gameService, auctionService, passportService, paymentService, memcachedClient)
        {
        }

        public ActionResult Index(int index = 1, int size = 20, string name = null)
        {
            var model = new HomeControllerModel.Index();
            model.Orders = OrderService.GetPagedOrder(index, size).ToPagedList(index, size);
            return PartialView(model);
        }

        public ActionResult Detail(string param)
        {
            var model = new HomeControllerModel.Detail();
            model.Order = OrderService.GetOrder(param, null, true, true, true);
            return PartialView(model);
        }
    }
}
